package com.dhcc.DRGsHosp.core.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.openkoala.koala.commons.domain.KoalaLegacyEntity;

/**
 * @title		:ClinicGroup.java
 * @description	:医疗组
 * @author		:mazhaoyan
 * @date		:2015年4月2日
 * @version     :1.0
 * @copyright   :DHCC 2013-2014 
 */
@Entity
@Table(name="T_CLINICGROUP", schema = "DRGs")
public class ClinicGroup extends KoalaLegacyEntity {
				// KoalaLegacyEntity
	private static final long serialVersionUID = -6453535938803348427L;
	
		// 主键
		@Id
		@Column(name = "ID", nullable = false)
		private String id ;
		
		//医疗组名称
		@Column(name = "GROUP_NAME",nullable=false)
		private String groupName;
		
		//医师编码
		@Column(name = "GROUP_CODE",nullable=false)
		private String groupCode;
		
		//医师类型
		@Column(name = "GROUP_TYPE",nullable=false)
		private String groupType;
		
		//Par科室代码
		@Column(name = "PARDEP_CODE",nullable=false)
		private String parDepCode;
		
		//Par病区代码
		@Column(name = "PARWARD_CODE")
		private String parWardCode;
		
		//是否有效
		@Column(name = "GROUP_ACTIVE")
		private Integer groupActive;
		
		//显示顺序
		@Column(name = "GROUP_ORDER")
		private String groupOrder;
		
		//科室组
		@Column(name = "PARDEPGROUP_CODE")
		private String parDepGroupCode;
		
		@Transient
		private String depName;
		
		@Transient
		private String wardDesc;
		
		@Transient
		private String groupTypeDesc;
	
	/**
	 * 空构造函数
	 */
	public ClinicGroup() {
		super();
	}
	
	public ClinicGroup(String id, String groupName, String groupCode, String groupType, String parDepCode,
			String parWardCode, Integer groupActive, String groupOrder, String parDepGroupCode ) {
		super();
		this.id = id;
		this.groupName = groupName;
		this.groupCode = groupCode;
		this.groupType = groupType;
		this.parDepCode = parDepCode;
		this.parWardCode = parWardCode;
		this.groupActive = groupActive;
		this.groupOrder = groupOrder;
		this.parDepGroupCode = parDepGroupCode;
	}

	public String getGroupTypeDesc() {
		return groupTypeDesc;
	}

	public void setGroupTypeDesc(String groupTypeDesc) {
		this.groupTypeDesc = groupTypeDesc;
	}

	public String getParDepGroupCode() {
		return parDepGroupCode;
	}

	public void setParDepGroupCode(String parDepGroupCode) {
		this.parDepGroupCode = parDepGroupCode;
	}

	public String getWardDesc() {
		return wardDesc;
	}

	public void setWardDesc(String wardDesc) {
		this.wardDesc = wardDesc;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public String getParDepCode() {
		return parDepCode;
	}

	public void setParDepCode(String parDepCode) {
		this.parDepCode = parDepCode;
	}

	public Integer getGroupActive() {
		return groupActive;
	}

	public void setGroupActive(Integer groupActive) {
		this.groupActive = groupActive;
	}

	public String getDepName() {
		return depName;
	}

	public void setDepName(String depName) {
		this.depName = depName;
	}
	
	public String getGroupOrder() {
		return groupOrder;
	}

	public void setGroupOrder(String groupOrder) {
		this.groupOrder = groupOrder;
	}
	
	
	
	public String getGroupCode() {
		return groupCode;
	}

	public void setGroupCode(String groupCode) {
		this.groupCode = groupCode;
	}

	public String getGroupType() {
		return groupType;
	}

	public void setGroupType(String groupType) {
		this.groupType = groupType;
	}

	public String getParWardCode() {
		return parWardCode;
	}

	public void setParWardCode(String parWardCode) {
		this.parWardCode = parWardCode;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	/* (non-Javadoc)
	 * @see org.openkoala.koala.commons.domain.KoalaBaseEntity#businessKeys()
	 */
	@Override
	public String[] businessKeys() {
		return null;
	}
	
	/**  
	 *  @Description：
	 *  @Author ChenHanlin  
	 *  @see java.lang.Object#hashCode()  
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1 ;
		result = prime * result + ((groupCode == null) ? 0 : groupCode.hashCode());
		return result;
	}

	/**  
	 *  @Description：
	 *  @Author ChenHanlin  
	 *  @see java.lang.Object#equals(java.lang.Object)  
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (getClass() != obj.getClass())
			return false;
		ClinicGroup other = (ClinicGroup) obj;
		if (groupCode == null) {
			if (other.groupCode != null)
				return false;
		} else if (!groupCode.equals(other.groupCode))
			return false;
		return true;
	}

}
